package com.book.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * <p>
 * 地址信息
 * </p>
 *
 * @author auto
 * @since 2025-04-02 06:38:55
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("address")
@Schema(name = "Address对象", description = "地址信息")
public class Address {

    @Schema(name = "主键")
    @TableId(value = "address_id", type = IdType.ASSIGN_UUID)
    private String addressId;

    @Schema(name = "用户ID")
    @TableField("user_id")
    private String userId;

    @Schema(name = "收货人")
    @TableField("receive_name")
    private String receiveName;

    @Schema(name = "收货人电话")
    @TableField("receive_phone")
    private String receivePhone;

    @Schema(name = "是否默认（0否1是）")
    @TableField("is_default")
    private Integer isDefault;

    @Schema(name = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @Schema(name = "修改时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @Schema(name = "省份")
    @TableField("province")
    private String province;

    @Schema(name = "城市")
    @TableField("city")
    private String city;

    @Schema(name = "区道")
    @TableField("district")
    private String district;

    @Schema(name = "详细地址")
    @TableField("detail")
    private String detail;
}
